package org.red5.demo;

import org.red5.Repository.VideoRepository;
import org.red5.websocket.WebsocketAPI;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component;

import javax.annotation.PostConstruct;
import javax.annotation.Resource;
import java.util.concurrent.ConcurrentHashMap;


@Component
public class ParameterAPI {

    public  static ConcurrentHashMap<String, Boolean> VideoMap = new ConcurrentHashMap<String, Boolean>();




    @Resource
    VideoRepository videoRepository;

    @Resource
    WebsocketAPI websocketAPI;

    static VideoRepository sVideoRepository;
    static WebsocketAPI sWebsocketAPI;

    @Resource
    PushRTMP pushRTMP;

    @PostConstruct()
    public void init(){
        sVideoRepository = videoRepository;
        sWebsocketAPI=websocketAPI;

        PushRTMP.iniVideo();

        //PushRTMP.iniVideoCMDTest();
    }


}
